#include <math.h>
#include <iostream>
#ifdef WIN32
# include <windows.h>
#endif
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#include <GLUT/glut.h>
#else
# include <GL/gl.h>
# include <GL/glut.h>
# include <GL/glext.h>
#endif
#include <Cg\cg.h>
#include <Cg\cgGL.h>

#include "CC_params.h"

#ifndef CWD
# define CWD ""
#endif

#ifdef WIN32
static unsigned __int64 rdtsc( void) {
   __asm rdtsc;
}
#endif;

static CGcontext Context = NULL;
static CGprogram fragmentProgram = NULL;
static CGprogram vertexProgram = NULL;

//----------------------------------------------------
// Input uniform parameters
//----------------------------------------------------
// Fragment Program Parameters
static CGparameter ScaleParam = NULL;

//----------------------------------------------------
// Non-uniform parameters 
//----------------------------------------------------

static CGparameter testTextureParam = NULL;
static CGparameter decalCoordsParam = NULL;

static CGprofile fragmentprofile;
static CGprofile vertexprofile;

// Number of points in the output image
int xsize = 320;
int ysize = 240;

// Number of renders per pass
int renders = 200;

static GLfloat *uv;

bool load = true; 
bool image = true;

static const float PI = 3.1415926;